package com.happly.payHapplycloud.config;

import com.lly835.bestpay.config.WxPayConfig;
import com.lly835.bestpay.service.BestPayService;
import com.lly835.bestpay.service.impl.BestPayServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class BestPayServiceConfig {

    @Bean
    public BestPayService bestPayConfig(){
        WxPayConfig wxPayConfig = new WxPayConfig();
        wxPayConfig.setAppId("wxab8acb865bb1637e");
        wxPayConfig.setMchId("11473623");
        wxPayConfig.setMchKey("2ab9071b06b9f739b950ddb41db2690d");
        //设置异步回调地址
        wxPayConfig.setNotifyUrl("http://www.jiajiao.space/order/notify.do");

        BestPayServiceImpl bestPayService = new BestPayServiceImpl();
        bestPayService.setWxPayConfig(wxPayConfig);

        return bestPayService;
    }
}
